PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


DrawThemeTrack

Draws a track.

pascal OSStatus DrawThemeTrack (
                     const ThemeTrackDrawInfo *drawInfo,
                     RgnHandle rgnGhost,
                     ThemeEraseUPP eraseProc,
                     UInt32 eraseData);
drawInfo
A pointer to a structure of type ThemeTrackDrawInfo . Before calling DrawThemeTrack , set the structure to contain the current visual characteristics of the track.
rgnGhost
A value of type RgnHandle . If the track is of a type that contains an indicator, such as a scroll bar or slider, you may pass a handle to the region where DrawThemeTrack is to draw a ghost image of the track indicator. Your application should only use a ghost image with the indicator when a track does not support live feedback. Pass NULL if you do not want to draw a ghost image.
eraseProc
A value of type ThemeEraseUPP . If you have a custom background, pass a universal procedure pointer to an application-defined function such as that described in MyThemeEraseProc . DrawThemeTrack calls that function to erase the background before drawing the track. If you pass NULL , no erasing occurs.
eraseData
An unsigned 32-bit integer. Provide any data to be passed in to the callback function specified in the eraseProc parameter.
function result
A result code; see Result Codes .
DISCUSSION

Your application may use the DrawThemeTrack function to draw a theme-compliant slider, progress bar, or scroll bar. If you use DrawThemeTrack to draw a scroll bar, use the function DrawThemeScrollBarArrows to draw the scroll bar's arrows; see Listing 3-7 in Drawing Tracks for an example of using these two functions together to draw a complete scroll bar. If you use DrawThemeTrack to draw a slider, use DrawThemeTrackTickMarks to draw any tick marks for the slider.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)